maintainer="Michał Polański <michal@polanski.me>"
pkgname=py3-tomli-w
pkgver=1.1.0
pkgrel=0
pkgdesc="A lil' TOML writer"
url="https://github.com/hukkin/tomli-w"
license="MIT"
arch="noarch"
makedepends="py3-flit-core py3-gpep517"
checkdepends="py3-pytest py3-tomli"
subpackages="$pkgname-pyc"
source="https://github.com/hukkin/tomli-w/archive/$pkgver/py3-tomli-w-$pkgver.tar.gz"
builddir="$srcdir/tomli-w-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/tomli_w-$pkgver-py3-none-any.whl
}

sha512sums="
0755004461017d3a62059ab74651c1fa0d2c67e224935760daa8d569b996db99e6c4077c92127b303a9026cf689d3db6a75cdb8d9178d9d3009b747b43ca2057  py3-tomli-w-1.1.0.tar.gz
"
